from typing import Callable
class Event:
    """事件类"""

    def __init__(self, event_type, data):
        self.event_type = event_type
        self.data = data

    def __str__(self):
        return f'Event(type={self.event_type}, data={self.data})'

HandlerType = Callable[[Event], None]